import { Inject, Controller ,Post ,Body} from '@midwayjs/decorator';
import { Context } from '@midwayjs/koa';
// import { AdminMiddleware } from 'src/middleware/adminiogin ';
import { ClassifyService } from 'src/service/class.service';
@Controller('/admin')
export class APIController {
  @Inject()
  ctx: Context;

  @Inject()
  ClassifyService: ClassifyService;


  @Post('/getclasspid')
  async getnovelitem( @Body() body) {
      console.log("addnovelitem",body);
     return  this.ClassifyService.getclasspid()
  }
  @Post('/getclass')
  async getclass( @Body() body) {
      console.log("addnovelitem",body);
     return  this.ClassifyService.getclass()
  }
  @Post('/addclasspid')
  async addclassitem( @Body() body) {
      console.log("addnovelitem",body);
     return  this.ClassifyService.addclasspid(body)
  }


}
